package com.zmn.oms.dubbo.interfaces.zmn.channel.docking;

/**
 * @author xiewenbing
 * @date 2021/03/19
 * @description  渠道对接远程接口定义
 */

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.oms.dubbo.dto.zmn.channel.*;
import com.zmn.oms.dubbo.dto.zmn.order.OrderWorkDRO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import javax.validation.constraints.NotNull;
import java.util.List;

@Api(
        value = "渠道对接远程接口类",
        tags = {"渠道对接相关接口"}
)
public interface ChannelDockingRemoteService {

    /**
     * 查询可预约时间
     *
     * @param availableTimeslotsQueryDIO
     * @return
     */
    @ApiOperation(value = "查询订单平台可预约时间")
    ResponseDTO<List<AvailableTimeslotsDRO>> queryAvailableTimeslots(@ApiParam(value = "查询参数") @NotNull(message = "参数不能为空") AvailableTimeslotsQueryDIO availableTimeslotsQueryDIO);

    /**
     * 通过订单id和渠道id查询订单详情
     *
     * @param channelOrderQueryDIO
     * @return
     */
    @ApiOperation(value = "查询渠道订单详情")
    ResponseDTO<OrderInfoDRO> queryChannelOrder(@ApiParam(value = "查询参数") @NotNull(message = "参数不能为空")ChannelOrderQueryDIO channelOrderQueryDIO);

    /**
     * 通过订单id和渠道id查询订单详情
     *
     * @param outerId
     * @param channelId
     * @return
     */
    @ApiOperation(value = "查询渠道订单详情")
    ResponseDTO<OrderInfoDRO> queryChannelOrderByOuterId(@ApiParam(value = "渠道订单id") @NotNull(message = "渠道订单id不能为空")String outerId,
                                                         @ApiParam(value = "渠道id") Integer channelId);

    /**
     * 渠道订单取消
     * @param cancelOrderDIO
     * @return
     */
    @ApiOperation(value = "渠道订单取消")
    ResponseDTO cancelOrder(@ApiParam(value = "订单取消参数") @NotNull(message = "参数不能为空")CancelOrderDIO cancelOrderDIO);

    /**
     * 渠道订单退款
     * @param refundOrderDIO
     * @return
     */
    @ApiOperation(value = "渠道订单退款")
    ResponseDTO refundOrder(@ApiParam(value = "订单退款参数") @NotNull(message = "参数不能为空")RefundOrderDIO refundOrderDIO);

    /**
     * 渠道订单支付，包括预付和二次支付
     * @param channelPayOrderDIO
     * @return
     */
    @ApiOperation(value = "渠道支付订单")
    ResponseDTO channelPayOrder(@ApiParam(value = "订单预付参数") @NotNull(message = "参数不能为空")ChannelPayOrderDIO channelPayOrderDIO);

    /**
     * 创建标准渠道订单
     * @param createChannelOrderDIO
     * @return
     */
    @ApiOperation(value = "创建标准渠道订单")
    ResponseDTO<OrderWorkDRO> createOrder(@ApiParam(value = "订单创建参数") @NotNull(message = "参数不能为空")CreateChannelOrderDIO createChannelOrderDIO);

    /**
     * 修改订单信息，包括预约时间，用户地址和电话，渠道订单id，渠道扩展信息，渠道预付状态，可弃单状态等
     * @param updateOrderDIO
     * @return
     */
    @ApiOperation(value = "修改订单信息")
    ResponseDTO updateOrder(@ApiParam(value = "订单修改参数") @NotNull(message = "参数不能为空")UpdateOrderDIO updateOrderDIO);

    /**
     * 订单自动流转
     * @param orderId
     * @param workId
     * @return
     */
    @ApiOperation(value = "修改订单信息")
    ResponseDTO orderAutoFlow(@ApiParam(value = "订单id") @NotNull(message = "订单id不能为空")Long orderId,
                              @ApiParam(value = "工单id") @NotNull(message = "工单id不能为空")Long workId);
    /**
     * 通过渠道id和渠道订单id查询工单详情
     * @param outerId
     * @param channelId
     * @return
     */
    @ApiOperation(value = "查询工单详情")
    ResponseDTO<OrderWorkDRO> findOrderWorkByChannelAndOuterId(@ApiParam(value = "渠道订单id") @NotNull(message = "渠道订单id不能为空")String outerId,
                                                               @ApiParam(value = "渠道id") Integer channelId);

    /**
     * 通过订单id和工单id查询工单详情
     * @param orderId
     * @param workId
     * @return
     */
    @ApiOperation(value = "查询工单详情")
    ResponseDTO<OrderWorkDRO> findOrderWorkById(@ApiParam(value = "订单id") @NotNull(message = "订单id不能为空")Long orderId,
                                                @ApiParam(value = "工单id") @NotNull(message = "工单id不能为空")Long workId);

    /**
     * 添加订单日志
     * @param orderLogDIO
     * @return
     */
    @ApiOperation(value = "添加订单日志")
    ResponseDTO saveOrderLog(@ApiParam(value = "订单日志参数") @NotNull(message = "参数不能为空")OrderLogDIO orderLogDIO);

    /**
     * 添加订单评价
     * @param orderCommentDIO
     * @return
     */
    @ApiOperation(value = "添加订单评价")
    ResponseDTO saveOrderComment(@ApiParam(value = "订单评价参数") @NotNull(message = "参数不能为空")OrderCommentDIO orderCommentDIO);

    /**
     * 发起工单自动跟单
     * @param orderAutoTrackDIO
     * @return
     */
    @ApiOperation(value = "起工单自动跟单")
    ResponseDTO updateOrderAutoTrack(@ApiParam(value = "工单自动跟单参数") @NotNull(message = "参数不能为空")OrderAutoTrackDIO orderAutoTrackDIO);

    /**
     * 查询订单备注
     * @param queryOrderRemarkDIO
     * @return
     */
    @ApiOperation(value = "起工单自动跟单")
    ResponseDTO<String> queryOrderRemark(@ApiParam(value = "查询订单备注参数") @NotNull(message = "参数不能为空")QueryOrderRemarkDIO queryOrderRemarkDIO);
}
